<?php
namespace app\common\model\appeal;
use app\common\model\setting\SettingAppealTypeModel;
use think\Model;

class ShopOrderAppealModel extends Model
{
    // 表名
    protected $name = 'shop_order_appeal';
    // 表主键
    protected $pk = 'id';

    // 关联申诉类型
    public function appealType()
    {
        return $this->hasOne(SettingAppealTypeModel::class, 'id', 'setting_appeal_type_id');
    }

    /**
     * 关联申诉回复
     * @Author: 易军辉
     * @DateTime:2024-06-28 15:34
     * @return \think\model\relation\HasMany
     */
    public function message()
    {
        return $this->hasMany(ShopOrderAppealMessageModel::class, 'shop_order_appeal_id', 'id');
    }
}
